export const fitScreen = () => {
  const body = document.documentElement
  const bodyWidth = body.clientWidth
  const bodyHeight = body.clientHeight
  const realRatio = bodyWidth / bodyHeight
  const designRatio = 16 / 9
  const scaleRate = realRatio > designRatio ? bodyHeight / 1080 : bodyWidth / 1920

  const app:any= document.querySelector('.bigScreen')

  app &&
    (app.style.transformOrigin = 'left top') &&
    (app.style.transform = `scale(${scaleRate}) translateX(-50%)`) &&
    (app.style.width = `${bodyWidth / scaleRate}px`)
}